package cn.zzqayy.steward.enums;

import lombok.Getter;

/**
 * 统一返回结果
 * @author zzqayy
 * @date 2020/7/2
 */
@Getter
public enum ResultEnum {

    //50008: Illegal token; 50012: Other clients logged in; 50014: Token expired
    SUCCESS(20000, "成功"),
    ERROR(40000, "程序错误"),
    ILLEGAL_TOKEN(50008, "违法的token"),
    OTHER_LOGGED_IN(50008, "其他人登录过了"),
    TOKEN_EXPIRED(50008, "token失效");

    private Integer code;

    private String msg;

    ResultEnum(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
}
